07. Comparison
Comparison
Now that you’ve coded both the BFS and A* algorithms, let’s take a closer look at their expansion list and compare them.
BFS
A*
Path
Result
You can clearly see that A* is more efficient since it did not expand in the free space as BFS did. With A* we reached the goal with only 11 expansions compared to 20 with BFS.